﻿#include <QGuiApplication>
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQuickView>
#include <QQmlContext>
#include <QWindow>
#include "dbutil.h"
#include  <QtQml>
#include "user.h"
#include <stdlib.h>
#include "draw.h"
#include "parameterrecond.h"
#include "reportform.h"
#include"dbutil.h"
#include    <QtQml>
#include"user.h"
#include"warninfo.h"
#include"gasflow.h"
#include"particulate.h"
#include"otherparameter.h"
#include"displaynum.h"
#include "inforecord.h"
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
     qmlRegisterType<Dbutil>("Db",1,0,"Dbutil");
     qmlRegisterType<User>("User",1,0,"User");
     qmlRegisterType<Warninfo>("Warn",1,0,"Warninfo");
     qmlRegisterType<Gasflow>("GasFlow",1,0,"Gasflow");
     qmlRegisterType<Particulate>("Particulate",1,0,"Particulate");
     qmlRegisterType<OtherParameter>("OtherParameter",1,0,"OtherParameter");
    qmlRegisterType<Draw>("paintline",1,0,"Draw");
    qmlRegisterType<ParameterRecord>("parameter",1,0,"ParameterRecond");
    qmlRegisterType<ReportForm>("report",1,0,"ReportForm");
    qmlRegisterType<DisplayNum>("displaynum",1,0,"DisplayNum");
     qmlRegisterType<InfoRecord>("inforecord",1,0,"InfoRecord");
    QQmlApplicationEngine engine;
    ParameterRecord model;
     InfoRecord warningmodel;
    engine.rootContext()->setContextProperty("theModel", &model);
    engine.rootContext()->setContextProperty("theWarningModel", &warningmodel);
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
    return app.exec();
}
